home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / daemons / nfs / nfs-serv.2be / nfs-serv / nfs-server-2.2beta16 / README < prev    next >
Encoding:
Text File  |  1995-12-21  |  8.1 KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.          The LINUX User-Space NFS Server(1)
  12.  
  13.             Version 2.2
  14.  
  15.  
  16.  
  17.              December 21, 1995
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. ____________________
  60.  
  61. 1. This     is a rewrite of the original README file (which you
  62.    can now find in README.HISTORIC).
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                 - 1 -
  71.  
  72.  
  73.  
  74. 1.  Overview
  75.  
  76. This package contains all necessary programs  to  make    your
  77. Linux  machine    act  as     an  NFS server, being an NFS daemon
  78. (rpc.nfsd), a mount daemon (rpc.mountd), optionally, the uid
  79. mapping     daemon     (rpc.ugidd), and the showmount utility.  It
  80. was originally developed by Mark Shand, and further enhanced
  81. by  Donald  Becker,  Rick Sladkey, Orest Zborowski, Fred van
  82. Kempen, and Olaf Kirch.
  83.  
  84. Unlike other NFS daemons, the Linux nfsd  runs    entirely  in
  85. user  space.   This  makes  it    a  tad slower than other NFS
  86. implementations, and also makes it hard to support a  couple
  87. of  UNIX file system features supported by other nfsd imple-
  88. mentations, especially several concurrent server  processes.
  89.  
  90.  
  91. 2.  Building and installing unfsd
  92.  
  93. To  compile  and  install  the programs in this package, you
  94. first have to run the BUILD script. It will ask you a couple
  95. of questions about your preferred configuration. It tries to
  96. be helpful by informing you about why it  asking  you  which
  97. question, but a brief overview may be useful nevertheless:
  98.  
  99. uid/gid mapping: Occasionally,    you  will  want to serve NFS
  100.      clients whose assignment of uids and gids to user names
  101.      differs  from  that  on  the  client. The unfsd package
  102.      offers you a mechanism to dynamically map the  client's
  103.      uid  space     to that of the server, and vice versa. This
  104.      is achieved by running  the  rpc.ugidd  daemon  on     the
  105.      client  machine,  and instructing the server machine to
  106.      use it to map the client's credentials presented to the
  107.      server in an NFS call, and remap file owner information
  108.      in all NFS replies.
  109.  
  110.      While this is convenient, it also presents     a  security
  111.      problem because rpc.ugidd can be abused by attackers to
  112.      obtain a list  of    valid  user  names  for     the  client
  113.      machine.  This  can  be helped somewhat by making ugidd
  114.      check  the      requester's    IP   address   against     the
  115.      hosts.allow  and hosts.deny files also used by the tcpd
  116.      wrapper program.
  117.  
  118.      Therefore, the BUILD script asks you about whether     you
  119.      want  to  use  ugidd at all, and if you do, whether you
  120.      wish to protect it using the host access control files.
  121.      Note that you still have to configure access control as
  122.      described below.
  123.  
  124.      If you do enable host access  checking  for  rpc.ugidd,
  125.      the  BUILD script will try to locate libwrap.a which is
  126.      needed for this. This library is part  of    Wietse    Ven-
  127.      ema's  TCP     wrapper  package.  BUILD  looks  in several
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                 - 2 -
  137.  
  138.  
  139.  
  140.      standard locations such as /usr/lib.  If  it  does     not
  141.      find  the    library     (e.g.    because you keep it in weird
  142.      places like /usr/i486-linux/lib), it will ask  you     for
  143.      its full path name.
  144.  
  145.      If     you  disable  ugidd support, the daemon will not be
  146.      compiled, and the manpage will not be installed.
  147.  
  148. file access control: For security reasons, mountd  and    nfsd
  149.      make  sure     that  vital  files such as /etc/exports are
  150.      owned by the  correct  user  and  have  an     appropriate
  151.      access  mode.  BUILD  will ask you which user and group
  152.      should  own  exports.   By     default,   this   will      be
  153.      root/root.
  154.  
  155. mount request logging: If you enable this option, rpc.mountd
  156.      will log all attempts to mount a directory via NFS from
  157.      your server machine. This is very helpful in monitoring
  158.      NFS server usage, and for catching attempts at attcking
  159.      your machine via NFS.
  160.  
  161.      When  enabled,  mountd  will  log    all successful mount
  162.      attempts to syslog's daemon facility at  level  notice.
  163.      Failed mount attempts are logged at level warning.
  164.  
  165. After completing these questions, BUILD will run a configure
  166. script to detect certain system capabilities. This will take
  167. a  while on your first attempt. Repeated invocations of con-
  168. figure will run a lot faster  because  the  results  of     the
  169. tests  are  cached.  If     you  want to start out with a fresh
  170. build on a different release of Linux, you should make    sure
  171. to  get     rid  of  these cached values by running `make dist-
  172. clean' first.
  173.  
  174. You can then compile  and  install  nfsd  by  typing  `make'
  175. and/or    (as root) `make install.' This will also install the
  176. manual pages.
  177.  
  178.  
  179. 3.  Configuring nfsd
  180.  
  181. To turn your Linux box into an NFS server, you have to start
  182. the  following programs from /etc/rc.d/rc.inet2 (or wherever
  183. your favorite  Linux  distribution  starts  network  daemons
  184. from):
  185.  
  186.    * rpc.portmap
  187.  
  188.    * rpc.mountd
  189.  
  190.    * rpc.nfsd
  191.  
  192.    * rpc.ugidd (optional)
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                 - 3 -
  203.  
  204.  
  205.  
  206.    * rpc.pcnfsd (optional, not contained in this package)
  207.  
  208. To  make  directories  available to NFS clients, you have to
  209. enter them in your exports file along with the hosts allowed
  210. to  mount  them.   The list of options and a sample file are
  211. given in the exports(5) manual page (and the whole topic  is
  212. covered     quite    extensively in the Linux Network Administra-
  213. tor's Guide anyway), so I will not  discuss  this  here.  If
  214. somebody  feels     like  filling    in  the     missing parts here,
  215. please send me the diffs.
  216.  
  217.  
  218. 4.  Configuring rpc.ugidd access control
  219.  
  220. To protect rpc.ugidd from unauthorized access, you just have
  221. to  add     lines    to  /etc/hosts.allow  and/or /etc/hosts.deny
  222. detailing which NFS servers that are allowed to     access     it.
  223. If  your  NFS  server  has the IP address 193.175.30.33, you
  224. would add the following to hosts.allow:
  225.  
  226.      # Allow ugidd access only to NFS server
  227.      ugidd: 193.175.30.33
  228.  
  229.  
  230. 5.  Common Problems (a.k.a. Dependencies)
  231.  
  232.    * Root squashing is enabled by default, which means    that
  233.      requests  from  the  root    user  are treated as if they
  234.      originated from the nobody user. If you  want  root  on
  235.      the  NFS  client  to  be able to access files with full
  236.      prvilege, you have to add no_root_squash to the  option
  237.      list in /etc/exports.
  238.  
  239.    * The  most    specific  entry     applies.  This means if you
  240.      export both /usr and /usr/local to a  client,  and     the
  241.      client  mounts  /usr  from     the server, the options for
  242.      /usr/local will still apply when the client accesses
  243.  
  244.    * Wildcards in client names only do not match dots.    This
  245.      means that the entry *.foo.com only matches hosts named
  246.      joe.foo.com etc, but  not    joe.sales.foo.com.  You     may
  247.      call  this a bug (and I may replace the current pattern
  248.      matching code with wildmat if there is enough  demand).
  249.  
  250.    * Changes  to  the  exports file do not take effect until
  251.      both nfsd and mountd have re-read the file. You  either
  252.      have  to  kill  both  daemons and restart them, or send
  253.      them a HUP signal:
  254.  
  255.      # killall -HUP rpc.mountd rpc.nfsd
  256.  
  257.    * NFS operation between two    Linux  boxes  can  be  quite
  258.      slow.  There are a number of reasons for this, only one
  259.      of which is that unfsd runs  in  user  space.   Another
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                 - 4 -
  269.  
  270.  
  271.  
  272.      (and  much     worse) problem is that the Linux NFS client
  273.      code currently does no proper caching,  read-ahead     and
  274.      write-behind  of  NFS data.  This problem can be helped
  275.      by increasing the RPC transfer size on  the  client  by
  276.      adding  the `rsize=8192,wsize=8192' mount options. This
  277.      will at least improve throughput when reading or  writ-
  278.      ing large files. You are still in a lose-lose situation
  279.      when applications write data line by line    or  with  no
  280.      output buffering at all.
  281.  
  282.  
  283. 6.  Copyright
  284.  
  285. Much  of  the code in this package was originally written by
  286. Mark Shand, and is placed under the following copyright:
  287.  
  288.    This software may be used for any purpose  provided
  289.    the    above copyright notice is retained. It is sup-
  290.    plied  as  is,  with     no  warranties     expressed  or
  291.    implied.
  292.  
  293. Other code, especially that written by Rick Sladkey and some
  294. replacement routines included from the GNU libc, are covered
  295. by  the     GNU  General Public License, version 2, or (at your
  296. option) any later version.
  297.  
  298.  
  299. 7.  Bug Reports
  300.  
  301. If you think you have encountered a bug in nfsd     or  any  of
  302. the  other  programs  in  this    package,  please  follow the
  303. instructions in the file BUGS.
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.